package com.shanzmoo.base.constant.e;

/**
 * @author fs
 * 用户类型枚举
 */
public enum LoginUserType {
    /**
     * 用户类型枚举
     */
    PT_FORMAL(0,"平台正式用户"),
    SH_TEMP(1,"商户临时用户"),
    SH_HUIYUAN(2,"商户会员");

    private Integer code;
    private String name;
    LoginUserType(Integer code, String name) {
        this.code = code;
        this.name = name;
    }
    public static LoginUserType codeof(Integer code){
        if(code == null){
            return null;
        }
        LoginUserType[] list = LoginUserType.values();
        for(LoginUserType one:list){
            if(one.code.intValue() == code){
                return one;
            }
        }
        return null;
    }
}
